text = """
Python is a popular programming language. It is widely used for web development, data science, and more.
Python has a simple and readable syntax, which makes it great for beginners.
"""
text = text.lower()
word_0 = text.split()  # 单词带有标点符号

words = []  # 用来接收去除标点符号后的单词
for i in word_0:
    t = i.strip(',.?!')
    words.append(t)
print(words)

word = dict()  # 用来接收单词和数量的kv对

for i in words:
    # if i in list(word.keys()):
    if i in word:
        word[i] = word[i] + 1
    else:
        word[i] = 1

print(word)
